<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<input type="button" value="红色" onclick="huanse('red')"/>
		<input type="button" value="黄色" onclick="huanse('yellow')"/>
		<input type="button" value="蓝色" onclick="huanse('blue')"/>
		<script type="text/javascript">
			function huanse(color) {
				document.body.style.background = color
			}
		</script>
	</body>

</html>